{layout name="layout2" /}
<style>
    /* 仅添加返回按钮样式 */
    .back-btn-container {
        text-align: center;
        margin: 20px 0;
    }
    
    .back-btn {
        display: inline-block;
        padding: 8px 16px;
        background-color: #292e33;
        color: #e7dddd;
        text-decoration: none;
        border: 1px solid #ddd;
        border-radius: 4px;
        transition: all 0.3s ease;
    }
    
    .back-btn:hover {
        background-color: #e9ecef;
        border-color: #ced4da;
    }
</style>

{empty name="items"}
订单没有商品！
{/empty}

{notempty name="items"}
<table>    
    <tr><td>图片</td><td>商品号</td><td>商品名</td><td>价格</td><td>数量</td><td>小计</td></tr>
    {foreach name="items" item="item"}
    <tr>        
        <td><img width='100px' height="100px" src='__STATIC__/upload/{$item.pImg}' ></td>
        <td>{$item.pId}</td>
        <td>{$item.pName}</td>
        <td>{$item.pPrice}</td>
        <td>{$item.number}</td>
        <td>{$item.totalPrice}</td> 
    </tr>
    {/foreach}    
</table>

<h2>总价：{$sumPrice}</h2>

<div class="back-btn-container">
    <a href="#" onclick="history.go(-1)" class="back-btn">返回</a>
</div>
{/notempty}